package per.jdz.circuitbreaker;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.concurrent.TimeUnit;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface CircuitBreaker {

    double criticalFailureRate();

    String callback() default "";

    long windowSize() default 5;

    TimeUnit timeUnit() default TimeUnit.SECONDS;
}